//
//  UIImage+Extension.swift
//  WeiBo
//
//  Created by qfh on 16/7/17.
//  Copyright © 2016年 qiufuhe. All rights reserved.
//

import UIKit



extension UIImage {


    class func getScenShot() -> UIImage {
    
    
        let window = UIApplication.sharedApplication().keyWindow!
        
        UIGraphicsBeginImageContext(window.size)
        
        
        window.drawViewHierarchyInRect(window.bounds, afterScreenUpdates: false)
        
        let image = UIGraphicsGetImageFromCurrentImageContext()
        
        UIGraphicsEndImageContext()
        
        return image
    
    
    }
    



}
